import 'package:flutter/material.dart';

class Widget_Center_Page extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Center"),
        ),
        body:Center(
//          widthFactor: 2,
//          heightFactor: 2,
          child: Text("center组件"),
        ),
      ),
    );
  }
}

/**
    Center继承自Align，只是将alignment设置为Alignment.center
    class Center extends Align {
    /// Creates a widget that centers its child.
    const Center({ Key key, double widthFactor, double heightFactor, Widget child })
    : super(key: key, widthFactor: widthFactor, heightFactor: heightFactor, child: child);
    }
 */
